home *** CD-ROM | disk | FTP | other *** search
/ Resource Library: Multimedia / Resource Library: Multimedia.iso / _archive / utils / graphics / convrtrs / mac / usngsgmg.txt < prev    next >
Internet Message Format  |  1993-06-12  |  14KB

  1. Date: Mon, 31 Aug 92 22:44:20 -0400 
  2. From: stewart@shiva.PSU.EDU (Dr. Jon Stewart)
  3. Subject: [*] Using Silicon Graphics images on the Mac, A report 
  4.  
  5.  
  6. Fellow MacUsers,
  7.  
  8. A few weeks ago I asked how I could use some of the images I created on the 
  9. Silicon Graphics workstation on my Mac.  Specifically, I have some pictures of
  10. protein structures that I wanted to pretty up and print out as part of docu-
  11. ments on my Mac.  I received three very helpful answers to this question, and
  12. for the benefit of others who might be interested in this problem, I have 
  13. collected the methods together (with the authors' kind permission) and
  14. submitted this to the report directory.  Many thanks to all who took the time
  15. to reply to my question!
  16.  
  17. Jon Stewart
  18. Department of Chemistry
  19. Penn State University
  20. stewart@shiva.psu.edu
  21.  
  22. ------------------------------Cut Here----------------------------------------
  23.  
  24. Bill - I suggest that this go in the report section and be titled
  25. silicon_graphics_to_mac.txt.  Thanks very much.
  26.  
  27.     Displaying Figures From a Silicon Graphics Workstation
  28.                 on the Macintosh
  29.  
  30.                     Jon Stewart
  31.         Department of Chemistry, Penn State University
  32.                 stewart@shiva.psu.edu
  33.  
  34.     This is a summary of responses that I received to the following 
  35. question: "I use a molecular modeling package (Quanta) on a Silicon 
  36. Graphics workstation which produces a PostScript file.  I can print this file 
  37. on an Apple LaserWriter IINT without any problem.  How can I convert 
  38. this into a format that I can edit and revise on the Mac, preferably PICT?"  
  39. I have combined the three most helpful suggestions that I received below, 
  40. and I have am deeply indebted each for his help.  I have tried to be as 
  41. accurate as possible; however, if you notice errors, please feel free to E-
  42. mail me at the above address.  Naturally, all credit goes to the authors; I 
  43. am only a grateful scribe :-).
  44.  
  45. .......................................................................................................................................................
  46.  
  47. Method #1.  Arun Malhotra, malhotra@neptune.cmc.uab.edu
  48.  
  49. [This method utilizes commands which are only found on a Silicon Graphics 
  50. workstation:  snapshot, tobw, invert and topict.  For more information on 
  51. these commands, type man <command> at the UNIX prompt.  Basically, 
  52. snapshot is like ScreenSnap for the Mac and it produces a color 
  53. screendump of whatever was located within the red square.  (Note:  The 
  54. output file for snapshot is always called snap.rgb, so be sure to rename it if 
  55. you make more than one snapshot before converting it!)  This is converted 
  56. to PICT format as follows. -- Jon]
  57.  
  58.     tobw snap.rgb    (converts the screen dump to black and white)
  59.     invert        (makes dark bonds on a white background)
  60.     topict        (converts the image to PICT format)
  61.  
  62. The image is downloaded to the Mac and the file type is changed to PICT, 
  63. then it can be opened as usual.
  64.  
  65. [I have not tried this method since the above commands have not yet been 
  66. compiled on our machine.  However, this method has the distinct 
  67. advantage that it does NOT depend on what program you are running on 
  68. the Silicon Graphics machine, and so should be a very versatile solution. -- 
  69. Jon]
  70.  
  71. A note about the IRIX commands:
  72.  
  73. The commands tobw, invert, and topict are not a part of the standard Unix, 
  74. but are utilities provided as a part of the IRIX operating system.  Thus, as 
  75. with the snapshot command, you will have to execute these commands 
  76. after you exit out of Quanta (or within another unix window).
  77.  
  78. The tobw, invert, pict, and a lot of other image utilities are provided with
  79. the SGI system as a part of "4Dgifts". These utilities (which also include
  80. source codes in C, as well as notes) will be in the /usr/people/4Dgifts
  81. directory on your SGI workstation. The image utilities are located in the 
  82. directory /usr/people/4Dgifts/iristools/imgtools (this has info on 
  83. commands and source code in C).  The command themselves (the 
  84. executable binaries) should be in /usr/sbin.  For example, if you cannot 
  85. execute tobw at a unix prompt, you may have to give the complete 
  86. pathname: /usr/sbin/tobw or add /usr/sbin to your pathlist in the .login 
  87. file. If this does not work, perhaps your system has the binaries in some 
  88. bin subdirectory in the /usr/people/4Dgifts directory.
  89.  
  90. .......................................................................................................................................................
  91.  
  92. Method #2.  Alan Hewat, hewat@frill.bitnet
  93.  
  94. I have had some moderate success with my first attempts at transferring 
  95. your SGI-PS file to something that can be edited on the Mac.  
  96.  
  97. [The file in question is a simple stick drawing of a protein consisting of 
  98. lines representing bonds on a blank background. -- Jon]
  99.  
  100. 1) Your SG-PS file is simple postscript to moveto (m) and draw a lineto (l).
  101.  
  102.   56.6  343.5 m
  103.   74.4  377.0 l
  104.   74.4  377.0 m
  105.   83.0  373.7 l
  106. etc....
  107.  
  108. 2) You can use a text editor (even teachtext) to copy and paste these m,l
  109. commands into an Adobe Illustrator file that you have saved empty.  You 
  110. put it between the %AI3_Note: (or %%EndSetup) and %%PageTrailer 
  111. statements near the end.
  112.  
  113. 3) Only put the m and l lines in...the other PS commands are not really
  114. necessary, (so far as I can see for the moment).  They will not work as 
  115. such.
  116.  
  117. 4) You will also need to put in a line containing just "S" immediately
  118. before each "m" line.  You can do this with a global edit of a file
  119. containing the m,l commands using eg Edit-II (a shareware app. on Sumex) 
  120. or Word or most other text editors.  There is probably a way of avoiding 
  121. this start of drawing "S" command, but I don't know how for the moment.
  122.  
  123. 5) You should then be able to re-open the file with Illustrator and edit the
  124. individual bonds.  Illustrator is a great program, and not difficult to learn.
  125.  
  126. 6) Alternatively, if you do all the above but use the PREVIOUS version of
  127. Illustrator called "88" (the latest version is 3.2), then you can also open
  128. the Illustrator-88 file in Canvas.  You can edit it in Canvas and even save
  129. it as PICT, and I have included various Canvas files with different formats
  130. including PICT, which you can view even with TeachText (system-7 
  131. version).  I don't know about MacDraw, but it should work too.
  132.  
  133. HOWEVER.  IMHO no drawing program is as good as Illustrator, so why go 
  134. to this extra trouble.  As well, the files produced by Canvas are very large,
  135. and succeed in bombing TeachText.
  136.  
  137. 7) My files so far produce drawings that seem to contain SECTIONS of the
  138. molecular structure.  I must have something not quite right, and will look
  139. at it again over the w/e.  But it works "en principe" as we say in France.
  140.  
  141. The problem is that (good as it is) Illustrator is very finicky about what
  142. it will accept as PS, and of course I have no doc. on that.  I am complaining 
  143. to Adobe.  They should allow it to open ordinary PS files such as yours 
  144. without all this trouble.
  145.  
  146. Best wishes, Alan.
  147. .......................................................................................................................................................
  148.  
  149. Method #3.  Andy Sheppard, mbasd@dlvh.daresbury.ac.uk
  150.  
  151. [This method is for users of the molecular modeling package Sybyl.  I have 
  152. included it because I think the general approach might be helpful to 
  153. others. -- Jon]
  154.  
  155. I just saw your posting to Info-Mac re: SGI->MacPICT conversion. While
  156. not being an exact answer to your question, you might get some help
  157. from the following posting I recently sent to the Sybyl Bulletin Board.
  158. I too had been frustrated about postscript transfer from Unix (an E&S
  159. ESV in my case) to Mac - my solution is described below: I see no reason
  160. why this should not also work on a SG machine. However you may then 
  161. have a problem in reading your PICT file into MacDraw II - MacDraw II 
  162. has a bad habit of losing ALL colour information. A better solution is to use 
  163. a painting program such as Illustrator, Canvas or MacCheese.
  164.  
  165. Some of other information you need is that your Mac must have a 
  166. reasonable amount of disk space and preferably >8 MB RAM. I would hope 
  167. that you could expand your SE to that amount of RAM fairly cheaply or 
  168. borrow a colleague's Mac II.
  169.  
  170. Although initially you need a lot of disk space, after translation to
  171. PICT format a 1.5MB ESV file will compress to about 100-300K (depending
  172. on the amount of detail in the picture) and even further to 10-30K
  173. using JPEGview/QuickTime compression!
  174.  
  175. Please let me know how you get on, as I'm sure this would be useful
  176. to other users!
  177.  
  178. Regards,
  179.  
  180. Andy Sheppard
  181.  
  182. Transfer to Macintosh is essential due to the dearth of such programs 
  183. for the ESV, on which I run Sybyl. There may also be a similar lack of 
  184. programs for the Iris and other Unix platforms on which Sybyl will run 
  185. - I don't really know. Anyway, I'm sure the majority of users would
  186. prefer to use a Mac rather than a Unix box! Below I have outlined a 
  187. route which I have perfected (?) to transfer an image from the ESV to
  188. Mac PICT format, which is the standard Mac Picture format, readable by
  189. all major Mac graphics applications (of course Nitro will output a PICT
  190. file).
  191.  
  192. This still relies on third-party software but is the best I can do. This 
  193. method is relatively painless and inexpensive, although a Mac II with at 
  194. least 8MB RAM and >2MB hard disk space is necessary.
  195.  
  196. Requirements:
  197. ------------
  198. ESV side:    Sybyl (of course)
  199. ------------xwd    (part of the standard X release for the ESV -
  200.         produces a dump file of any X window)
  201.         kermit (or other method of transferring a binary file
  202.         to the Mac from the ESV)
  203.  
  204. Mac side:    Mac II class Macintosh (I use MacIIcx, 8-bit colour,
  205. ------------8MB RAM, hard disk)
  206.         kermit, VersaTerm PRO...(or other terminal emulator)
  207.         Imagery v1.8 (see below)
  208.         32-bit painting program (e.g. MacCheese, costs about
  209.         $100, or a more expensive program such as
  210.         Photoshop, Studio 32 etc.)
  211.  
  212. Procedure:
  213. -------------
  214.  
  215. 1.    In Sybyl on the ESV, get your image on the screen, press F6 to 
  216.         remove the tool-palette icons. Resize the picture window to 
  217.         640x480 pixels: this is a good Mac size. Scale the image to 
  218.         fit the window [N.B. you may get some harmless PEX error messages 
  219.         while doing this part].
  220.  
  221. 2.    At the "Sybyl>" prompt, type "dcl xwd -out name.xwd" <enter> 
  222.         where "name" is the name for your picture. The cursor will change
  223.         from an arrow to a "+". Click inside the window containing your
  224.         picture. The bell will sound: after a few seconds it will sound
  225.         again indicating the file has been written to disk. For a 640x480
  226.         pixel window, the file will be about 1.25MB in size (:-O).
  227.  
  228. 3.    Logon to the ESV from the Mac using Kermit/VT PRO and 
  229.         RS232/Ethernet connection. When logged in, procedure for file 
  230.         transfer to the Mac is:
  231.  
  232.     % kermit <enter>
  233.     C-kermit> set file type binary <enter>
  234.     C-kermit> send name.xwd <enter>
  235.     (then do whatever is necessary to start file transfer to Mac using the 
  236.     terminal emulator - make sure you have enough hard disk space!)
  237.     C-kermit> exit <enter>
  238.     % exit <enter>
  239.  
  240. 4.    Quit from the terminal emulator, start up Imagery v1.8. Imagery 
  241. is an EXTREMELY useful program for translating many graphics file 
  242. formats (Sun raster files, IBM files etc.) to Mac format. Imagery is public 
  243. domain, written by Jeff Lewis (76217.2241@COM.COMPUSERVE) and 
  244. available on many bulletin boards and archives. The "memory size" in the 
  245. Imagery "Get Info" box should be set to 5000K to handle the large file. 
  246. Versions earlier than 1.8 do not work for ESV files.
  247.  
  248. 5.    Select PICT2 output. Open up the xwd file: the filename MUST have 
  249. ".xwd" on the end so that Imagery knows to translate an X window dump 
  250. file.  Type the output filename for the PICT file. When translation is 
  251. complete, the output file will have been reduced to between about 30-
  252. 300K depending on the amount of detail in the original: trash the ".xwd" 
  253. file to free up disk space.
  254.  
  255. 6.    Open up the PICT file in MacCheese (or whatever) in "32-bit true 
  256. colour" mode (again the memory partition for MacCheese etc. should be 
  257. about 5000K at this stage). The image should be displayed - remarkably 
  258. little loss in resolution, depth cueing or colour compared to the original ESV
  259. image should be observed.
  260.  
  261. 7.    Retouch the image in your painting program as required - the image 
  262. will be on a black background but this can easily be changed [N.B. it would 
  263. be nice to have a white Sybyl background instead of just a black one 
  264. sometimes*] - then print, integrate into a report, QuickTime movie, etc.....
  265.  
  266. I hope you can see that this is a very inexpensive and effective way of 
  267. producing good pictures from Sybyl and perhaps other users would like to 
  268. try it too.
  269.  
  270. etc.........
  271.  
  272. * A way to get a white background is:
  273. 1. edit file $TA_ROOT/lib/X11/1280x1024/Sybyl
  274. 2. change line
  275.    sybyl*portBackground     black
  276.    to:
  277.    sybyl*portBackground     white
  278. --------------------------------------------
  279.  
  280. .......................................................................................................................................................
  281.  
  282. So which method will work best for you?  It depends.  If you want full 
  283. color images and don't care too much about size, then methods 1 or 3 look 
  284. best.  If you images are a relatively small number of lines on a blank 
  285. background and you need to edit the individual lines, then try to make 
  286. method 2 work.
  287.  
  288. One other method that wasn't mentioned but which might be useful is to 
  289. save your output in Hewlet-Packard 7450 plotter output files.  There is a 
  290. Hypercard stack at Sumex-aim called HP2PICT which is supposed to do 
  291. simple conversions between these formats.  In addition, the documentation 
  292. for Imagery 1.8 says that the next version of this program will also handle 
  293. this conversion.
  294.  
  295. Many thanks to Arun, Alan and Andy for all of their time and effort, and 
  296. all compliments should certainly be directed to them.
  297.  
  298.  
  299.  
  300.  
  301.